package com.example.sms.exception;

/**
 * @author bill
 * @date 2024/1/16 16:09
 */
public enum ExceptionCode {
    NULL_TOKEN(1001,"token不允许为空"),
    LOGIN_FAILED(1002,"登陆失败"),
    REGISTER_FAILED(1003,"注册失败"),
    UPDATEPASSWOED_ERROR(1004,"用户密码修改失败"),
    UPDATEUSERNAME_ERROR(1005,"用户名修改失败"),
    PHONE_NO_CODE(1006,"验证码失效"),
    WRONG_CODE(1007,"验证码错误"),
    EXISTS_PHONE(1008,"用户已存在"),
    NO_EXISTS_PHONE(1009,"该用户尚未注册"),
    NO_EXISTS_TOKEN(1010,"token不允许为空"),
    LOGIN_LAPSE(1011,"登陆已失效"),
    TOKEN_ERROR(1012,"token已失效"),
    TOKEN_ERROR1(1013,"token已被篡改"),
    PHONE_EXISTS(1014,"该手机号已存在"),
    PHONE_NO_EXISTS(1015,"该手机号不存在"),
    NO_DATA(1016,"没有数据了"),
    USER_FAIL_UPDATE(1017,"用户数据修改失败"),
    BOOKINFO_NULL(1018,"书籍信息为空"),
    ADMIN_ICE(1019,"该账号已冻结"),
    DO_FILE(1920,"操作失败"),
    SMS_FILE(0000,"发送短信失败!"),
    PHONE_FILE(2001,"手机号码不合法!"),
    ;


    private Integer code;
    private String msg;

    ExceptionCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
